home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / share / pyshared / liveusb / olpc.py < prev    next >
Encoding:
Text File  |  2011-05-31  |  1.1 KB  |  41 lines

  1. # Open Firmware Configuration for the OLPC
  2. ofw_config = """\
  3. \ Boot script for USB boot
  4. \ Authors: Mitch Bradley <wmb AT laptop DOT org>
  5. hex  rom-pa fffc7 + 4 $number drop  h# 2e19 < [if]
  6.   patch 2drop erase claim-params
  7.   : high-ramdisk  ( -- )
  8.      cv-load-ramdisk
  9.      h# 22c +lp l@ 1+   memory-limit  umin  /ramdisk - ffff.f000 and ( new-ramdisk-adr )
  10.      ramdisk-adr over  /ramdisk move                    ( new-ramdisk-adr )
  11.      to ramdisk-adr
  12.   ;
  13.   ' high-ramdisk to load-ramdisk
  14. [then]
  15.  
  16. : set-bootpath-dev  ( -- )
  17.    " /chosen" find-package  if                       ( phandle )
  18.       " bootpath" rot  get-package-property  0=  if  ( propval$ )
  19.          get-encoded-string                          ( bootpath$ )
  20.          [char] \ left-parse-string  2nip            ( dn$ )
  21.          dn-buf place                                ( )
  22.       then
  23.    then
  24.  
  25.    " /sd"  dn-buf  count  sindex  0>=   if
  26.           " sd:"
  27.    else
  28.           " u:"
  29.    then
  30.    " BOOTPATHDEV" $set-macro
  31. ;
  32.  
  33. set-bootpath-dev
  34. " %s" to boot-file
  35. " ${BOOTPATHDEV}\syslinux\initrd0.img" expand$ to ramdisk
  36. " ${BOOTPATHDEV}\syslinux\\vmlinuz0" expand$ to boot-device
  37. unfreeze
  38. dcon-unfreeze
  39. boot
  40. """
  41.